Skip to content

Conversation

@HoshimiP
Copy link
Contributor

adjust linker script to ensure tests run

@AsakuraMizu
Copy link
Contributor

Let me fix the CI issue first.

Copy link
Contributor

@AsakuraMizu AsakuraMizu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the threading and panic::catch_unwind part. Though there are still issues:

  1. There is some overlap with existing tests; let's merge them.
  2. What is the purpose of serial_test? If it's due to data conflicts, please isolate the data used by the test cases.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances test coverage for scope-local functionality by adding three new test scenarios and fixes a linker script issue to ensure tests run properly. The changes add comprehensive testing for multi-threading, panic handling, thread isolation, and nested scope behavior.

Key Changes:

  • Added multi-threading and panic recovery tests to the existing shared test
  • Introduced new isolation test to verify thread-local scope independence
  • Added new nested test to verify scope stacking behavior
  • Fixed linker script by removing explicit 0x0 VMA address from .percpu section

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/scope_local.rs Adds panic and thread imports, extends shared test with multi-threading and panic scenarios, adds isolation and nested test functions to verify thread safety and scope nesting
percpu.x Removes explicit 0x0 VMA address from .percpu section definition to allow relative positioning and ensure tests run correctly

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +94 to +166

ActiveScope::set_global();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line? I remember percpu delegates to thread local if target_os = "linux"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this line will cause a SIGSEGV

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this line will cause a SIGSEGV

That's strange, and may indicate a bug in our design.

@AsakuraMizu
Copy link
Contributor

I tested it several times locally and found the results to be unstable. This is likely related to an issue with percpu. Let's see if arceos-org/percpu#16 fixes it.

@AsakuraMizu
Copy link
Contributor

Waiting for percpu to release a new version.

@AsakuraMizu
Copy link
Contributor

Sry I pushed code to your repository again 🐱

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AsakuraMizu AsakuraMizu merged commit 3d53bef into Starry-OS:main Dec 22, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants